using B.S.XZYData.Domain.XZY;

namespace B.S.XZYData.Api.Read.Application.Command.Team
{
    public class TeamDTO
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int Id { get; set; }
        
        /// <summary>
        /// 编组编码
        /// </summary>
        public string TeamCode { get; set; } = string.Empty;
        
        /// <summary>
        /// 班组名称
        /// </summary>
        public string TeamName { get; set; } = string.Empty;
        
        /// <summary>
        /// 班组类型
        /// </summary>
        public TeamTypeEnum TeamType { get; set; }
        
        /// <summary>
        /// 班组类型名称
        /// </summary>
        public string TeamTypeName => TeamType switch
        {
            TeamTypeEnum.Warehouse => "仓库",
            TeamTypeEnum.Assembly => "组装",
            TeamTypeEnum.Machining => "机加工",
            TeamTypeEnum.InjectionMolding => "注塑",
            _ => "未知"
        };
        
        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remark { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        
        /// <summary>
        /// 创建人
        /// </summary>
        public string Creator { get; set; } = string.Empty;
        
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyTime { get; set; }
        
        /// <summary>
        /// 修改人
        /// </summary>
        public string Modifier { get; set; } = string.Empty;
    }
}
